package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc WorkTaskTypeDto
 * @使用场景
 */
@Data
public class WorkTaskTypeDto extends BaseDto implements Serializable {

    /**
     * 工作类型标识
     */
    @ApiModelProperty("工作类型标识")
    private String workTaskTypeCode;

    /**
     * 工作任务类型名称
     */
    @ApiModelProperty("工作任务类型名称")
    private String workTaskTypeName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        WorkTaskTypeDto that = (WorkTaskTypeDto) o;
        return (
                workTaskTypeCode == that.workTaskTypeCode &&
                        workTaskTypeName == that.workTaskTypeName
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), workTaskTypeCode, workTaskTypeName);
    }

}
